package com.scuec.groupfive.Controller;

import com.scuec.groupfive.entity.StudyProgress;
import com.scuec.groupfive.service.StudyProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/study-progress")
public class StudyProgressController {

    @Autowired
    private StudyProgressService studyProgressService;

    @GetMapping("/{userId}")
    public List<StudyProgress> getStudyProgress(@PathVariable Long userId) {
        return studyProgressService.getStudyProgress(userId);
    }
}